<!-- <style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style> -->

<template src="./index.html"></template>
<script>
    
    export default {
        components: {

        },
        data() {
            return {
                microApp: null,
                qkData: null
            };
        },
        methods: {
            setConfig() {
                if (this.qkData) {
                    let _is = document.querySelector(this.qkData.app.container);
                    if (_is) {
                        this.microApp = this.$vFN.Qk.loadMicroApp(this.qkData.app, this.qkData.config)
                    } else {
                        setTimeout(() => {
                            this.setConfig();
                        }, 500)
                    }
                }
            },
        },
        computed: {},
        mounted() {
            this.qkData = this.$vFN.Qk.appsConfig('design', "main");
            
            this.setConfig();
        },
        activated() {},
        //    销毁后
        destroyed() {
            if(this.microApp){
                this.microApp.unmount();
            }
        },
        watch: {

        },
    };
</script>